package com.luzhikun.dispatcherForward;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class OtherForward extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        //（forward）req====org.apache.catalina.core.ApplicationHttpRequest@3242a560
        //(include)req====org.apache.catalina.core.ApplicationHttpRequest@61a7391d
        System.out.println("req====" + req);
//     （forward） resp====org.apache.catalina.connector.ResponseFacade@3c855c80
//     (include) resp====org.apache.catalina.core.ApplicationHttpResponse@6cdba993
        System.out.println("resp====" + resp);

        resp.getWriter().println("Other Servlet");

    }
}
